<template>
  <div class="sync-component">
    <div class="head">
        <div class="head-img">
            <img :src="data.headImg" alt="">
        </div>
        <div class="head-name">{{ data.name }}</div>
    </div>

    <hr>

    <div class="content">
        {{ data.desc }}
    </div>
  </div>
</template>

<script setup lang='ts'>
import {ref, reactive } from 'vue'
import {axios} from '../../server/axios'

interface Data {
    data: {
        name: string,
        headImg: string,
        desc: string
    }
}

const {data} = await axios.get<Data>('./syncData.json')

</script>
<style scoped>
.sync-component {
    height: 200px;
    width: 700px;
    background-color: rgb(240, 240, 240);
    border-radius: 8px;
    padding: 15px;
}

.head {
    height: 65px;
    width: 100%;

    display: flex;
    align-items: center;
}

.head-img {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    overflow: hidden;
}

.head-img img {
    width: 200%;
}

.head-name {
    width: 200px;
    height: 40px;
    border-radius: 8px;
    margin-left: 10px;
}

.content {
    margin-top: 10px;
    width: 100%;
    height: 120px;
}
</style>